package com.CityHunter.OverLay;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.graphics.drawable.Drawable;

import com.CityHunter.DataObject.Prey;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class ShowPreyOverlay extends ItemizedOverlay<OverlayItem>{
	
	private Context context;
	private List<OverlayItem> items = new ArrayList<OverlayItem>();
	
	public ShowPreyOverlay(Drawable preyMarker,Context context,List<Prey> preys){
		super(boundCenterBottom(preyMarker));
		this.context = context;
		items.clear();
		for (int i = 0; i < preys.size();i++){
			Prey prey = (Prey)preys.get(i);
			items.add(new OverlayItem(prey.getGeoPoint(),prey.getPreyTitle(),null));
		}
		populate();
	}

	@Override
	protected OverlayItem createItem(int i) {
		return items.get(i);
	}

	@Override
	public int size() {
		return items.size();
	}
	
}
